﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuroSpeech.XamlTypeResolver
{
    public class XTNamespaceDef
    {

        public string AssemblyName { get; set; }

        public string Namespace { get; set; }

        public string Prefix { get; set; }

        public string ClrNamespace { get; set; }


        #region public override string  ToString()
        public override string ToString()
        {
            if (!string.IsNullOrWhiteSpace(AssemblyName)) { 
                return string.Format("{0}; assembly={1}",ClrNamespace,AssemblyName);
            }
            return Namespace;
        }
        #endregion

        public bool Equals(XTNamespaceDef def) {

            if (!string.IsNullOrWhiteSpace(def.Namespace))
                return def.Namespace == Namespace;
            return ClrNamespace == def.ClrNamespace;

        }

    }
}
